APPNAME:=httpsrv.exe
VERSION:=1.0
SOURCE:=main.go config.go request.go
LDFLAGS:=-ldflags "-w -s -X main.VERSION=${VERSION} -X main.BUILDTIME=`date '+%Y-%m-%d_%H:%M:%S'`"

build:
	@echo 'AppName: ${APPNAME}'
	@echo 'Version: ${VERSION}'
	@go build ${LDFLAGS} -o ${APPNAME} ${SOURCE}

install: clean
	@mkdir bin
	@mv ${APPNAME} bin/
	@cp -r config.toml request.db bin/

clean:
	@rm -rf bin debuglog

.PHONY: build install clean
